package cn.edu.szpt.qqdemov3.adapters;

import android.content.Context;
import android.media.Image;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

import cn.edu.szpt.qqdemov3.R;
import cn.edu.szpt.qqdemov3.beans.QQContactBean;
import cn.edu.szpt.qqdemov3.beans.TeamBean;

public class TeamAdapter extends RecyclerView.Adapter<TeamAdapter.ViewHolder> {

   private ArrayList<TeamBean> data;
   private Context context;

    public TeamAdapter(ArrayList<TeamBean> data, Context context) {
        this.data = data;
        this.context = context;
    }

    @NonNull
    @Override

    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {

        View inflate = LayoutInflater.from(context).inflate(R.layout.activity_forget_pwd,parent, false);

        return new ViewHolder(inflate);
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {


        TeamBean bean = data.get(position);
//        holder.imgFlag.setImageResource();
//        holder.imgGood.setImageResource();
//        holder.txtName.setText();
    }

    @Override
    public int getItemCount() {
        return data.size();
    }


    class ViewHolder extends RecyclerView.ViewHolder {


        TextView txtName;
        TextView txtSupport;
        ImageView imgFlag;
        ImageView imgGood;

        public ViewHolder(@NonNull View itemView) {
            super(itemView);


            txtName = itemView.findViewById(R.id.txtName);
            txtSupport = itemView.findViewById(R.id.txtSupport);
            imgGood = itemView.findViewById(R.id.imgGood);
            imgFlag = itemView.findViewById(R.id.imgFlag);
        }
    }

}
